package com.nft.service.school.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nft.service.school.entity.SchoolPayrecordEntity;
import com.nft.service.school.resp.SchoolPayrecordResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("master")
public interface SchoolPayrecordMapper extends BaseMapper<SchoolPayrecordEntity> {
    @Select("select sum(remainder) as remainder from school_payrecord where student_id in #{studentIds}")
    public SchoolPayrecordResp getUserRemainder(List<Long> studentIds);
}
